package org.itheimma.springbootquickstart.service.ipml;

import org.itheimma.springbootquickstart.mapepr.ModelMapper;
import org.itheimma.springbootquickstart.pojo.Models;
import org.itheimma.springbootquickstart.pojo.Users;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ModelService implements org.itheimma.springbootquickstart.service.ModelService {
    @Autowired
    private ModelMapper modelMapper;
//    @Override
//    public Models findByMId(int threeId) {
//        Models m = modelMapper.findByMId(threeId);
//        return m;
//    }

    @Override
    public void upload(Models model) {
//        model.setThree_url("locallhost:8080/models/" + model.getThree_url());
        modelMapper.add(model);
    }

    @Override
    public void uploadImgId(String imageId,int threeId) {
        imageId = '|' + imageId;
        modelMapper.uploadImgId(imageId,threeId);
    }


}
